import 'package:flutter/material.dart';

class ListCase extends StatelessWidget {
  ListCase({super.key});
  final List nums = [1, 2, 3, 4, 5, 6, 7, 8, 9];
  @override
  Widget build(BuildContext context) {
    return ListView.builder(
      itemBuilder: (context, index) {
        return Container(
          height: 100,
          color: Colors.green,
          margin: const EdgeInsets.symmetric(vertical: 3),
          child: Text(nums[index].toString()),
        );
      },
      itemCount: nums.length,
      // children: nums
      //     .map((item) => Container(
      //           height: 100,
      //           color: Colors.red,
      //           margin: const EdgeInsets.symmetric(vertical: 5),
      //           child: Text(item.toString()),
      //         ))
      //     .toList(),
    );
  }
}
